package com.fiume.travel.mapperExt;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * Description:
 * </p>
 *
 * @author fiume
 * @version v1.0.0
 * @create 2021-02-13 23:45
 * @see com.fiume.travel.mapperExt
 */
@Mapper
public interface RouteMapperExt {

    /**
     * 通过用户routeId修改该线路的收藏人数
     * @param routeId 线路id
     * @return 是否成功
     */
    @Update("UPDATE tab_route " +
            "SET attention_count = attention_count+1 " +
            "WHERE id = #{routeId,jdbcType=BIGINT}")
    int updateRouteCountById(@Param("routeId") Long routeId);
}
